import React from 'react';

import './progress.css';

import Util from '../../utils';
import { Slider } from 'antd';

class Progress extends React.Component {

  render() {
    const { fullTime, nowTime, dragNowTime } = this.props;
    return (
      <div className="components-progress">
        <div className="progress-bar">
          <Slider value={nowTime} min={0} max={fullTime} tipFormatter={null} onChange={dragNowTime}></Slider>
        </div>
        <div className="progress-time">
          {Util.formSecondToDate(nowTime)}/{Util.formSecondToDate(fullTime)}
        </div>
      </div>
    )
  }
}

export default Progress;